﻿CREATE TABLE [dbo].[Customer] (
    [CustomerId]        INT           IDENTITY (1, 1) NOT NULL,
    [FullName]          NVARCHAR (50) NOT NULL,
    [Sex]               BIT           NULL,
    [IdentityCardClass] VARCHAR (10)  NOT NULL,
    [CardNumber]        NCHAR (20)    NOT NULL,
    [CreatedDate]       DATE          NOT NULL,
    [Expired]           DATE          NOT NULL,
    [PhoneNumber]       VARCHAR (15)  NULL,
    [CustomerClassId]   INT           NOT NULL,
    CONSTRAINT [PK__Khach_Ha__F9279E969E92BDE7] PRIMARY KEY CLUSTERED ([CustomerId] ASC),
    CONSTRAINT [FK_Customer_CustomerClass] FOREIGN KEY ([CustomerClassId]) REFERENCES [dbo].[CustomerClass] ([CustomerClassId])
);

